<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateVassetMediasTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        //
        Schema::create('vasset_medias', function (Blueprint $table) {
            $table->increments('id');
            // 服务商ID
            $table->integer('sp_id');
            // 媒资ID
            $table->integer('vasset_id');
            // 资源
            $table->string('source')->nullable();
            // 图片
            $table->string('img')->nullable();
            // 播放信息
            $table->text('playinfo')->nullable();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
        Schema::dropIfExists('vasset_medias');
    }
}
